package com.letv.business.flow.album;

import android.app.Activity;
import com.letv.core.bean.AlbumNew;
import com.letv.core.bean.VideoBean;
import com.letv.core.utils.LetvBaseObservable;

/**
 * 点播流程观察者
 * 
 * @author zhuqiao
 * 
 */
public class AlbumPlayFlowObservable extends LetvBaseObservable {
    private static final String TAG = "PlayAlbumFlowObservable";

    /**
     * 开始获取数据
     */
    public static final String ON_START_FETCHING = TAG + 1;
    /**
     * 开始码流切换
     */
    // public static final String ON_STREAM_SWITCH_START = LedimVedioTagBean + 2;
    /**
     * 码流初始化
     */
    public static final String ON_STREAM_INIT = TAG + 4;
    /**
     * 设置小窗按钮的显示状态
     */
    public static final String ON_CHECK_PIP_VISIBILE = TAG + 5;
    /**
     * 请求视频信息成功
     */
    public static final String ON_REQUEST_VIDEO_INFO_SUCCESS = TAG + 6;
    /**
     * 请求视频信息失败
     */
    public static final String ON_REQUEST_VIDEO_INFO_FAIL = TAG + 7;
    /**
     * 刷新显示全屏的视频列表
     */
    public static final String ON_SHOW_FULL_VIDEO_LIST = TAG + 8;
    /**
     * 刷新显示全屏的视频列表(isPlayNext = true)
     */
    public static final String ON_SHOW_FULL_VIDEO_LIST_PLAY_NEXT = TAG + 9;
    /**
     * 播放器上显示3g提示
     */
    public static final String ON_SHOW_3G = TAG + 10;
    /**
     * 播放器上隐藏3g提示
     */
    public static final String ON_HIDE_3G = TAG + 11;
    /**
     * 播放器上显示黑屏
     */
    public static final String ON_SHOW_3G_WITH_BLACK = TAG + 12;
    /**
     * 刷新综艺看点
     */
    public static final String REFRESH_DATA_AFTER_REQUEST_VIDEO_URL = TAG + 13;
    public static final String ON_CONTROLLER_DISABLE = TAG + 14;

    /**
     * 设置标题
     * 
     * @author zhuqiao
     * 
     */
    public static class VideoTitleNotify {
        public final String title;

        public VideoTitleNotify(String title) {
            this.title = title;
        }

    }

    /**
     * 设置错误码
     * 
     * @author zhuqiao
     * 
     */
    public static class PlayErrorCodeNotify {
        public final String errorCode;
        public final boolean shouldShow;

        public PlayErrorCodeNotify(String errorCode, boolean shouldShow) {
            this.errorCode = errorCode;
            this.shouldShow = shouldShow;
        }

    }

    /**
     * 初始化controller下载按钮
     * 
     * @author zhuqiao
     * 
     */
    public static class InitDownloadBtnNotify {
        public final AlbumNew albumNew;
        public final VideoBean video;

        public InitDownloadBtnNotify(AlbumNew albumNew) {
            this(albumNew, null);
        }

        public InitDownloadBtnNotify(AlbumNew albumNew, VideoBean video) {
            this.albumNew = albumNew;
            this.video = video;
        }

    }

    /**
     * 处理浮球逻辑
     * 
     * @author zhuqiao
     * 
     */
    public static class FloatBallNotify {
        public final Activity activity;
        public final String toHandleModel;
        public final String cid;

        public FloatBallNotify(Activity activity, String toHandleModel, String cid) {
            this.activity = activity;
            this.toHandleModel = toHandleModel;
            this.cid = cid;
        }

    }

    /**
     * 刷新全屏的视频列表
     * 
     * @author zhuqiao
     * 
     */
    public static class FullControllerInitVideos {
        public final boolean isNextPlayer;

        public FullControllerInitVideos(boolean isNextPlayer) {
            this.isNextPlayer = isNextPlayer;
        }

    }

    public static class RequestCombineParams {
        public final String pid;
        public final String vid;
        public final String cid;
        public final String zid;

        public RequestCombineParams(String pid, String vid, String cid, String zid) {
            this.pid = pid;
            this.vid = vid;
            this.cid = cid;
            this.zid = zid;
        }

    }

    /**
     * 
     * @author zhuqiao
     *
     */
    public static class HandNotify {
        public final VideoBean video;

        public HandNotify(VideoBean video) {
            this.video = video;
        }
    }

    /**
     * 
     * @author zhuqiao
     *
     */
    public static class SetSeekBarEndTimeNotify {
        public final int time;

        public SetSeekBarEndTimeNotify(int time) {
            this.time = time;
        }

    }
}
